"""OpSystem URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.10/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.conf.urls import url, include
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url,include
from cmdb import views
urlpatterns = [
    url(r'dashboard/',views.index,name='dashboard'),
    url(r'hosts/',views.hosts,name='hosts'),
    url(r'host_refurbish',views.host_refurbish,name='host_refurbish'),
    url(r'host_init',views.host_init,name='host_init'),
    url(r'userManages/',views.users,name='usermanage'),
    url(r'items/$',views.items,name='items'),
    url(r'item/add',views.item_add,name='item_add'),
    url(r'items_soft/$',views.items_soft,name='items_soft'),
    url(r'^items_soft/add/$',views.items_soft_add,name='items_soft_add'),
    url(r'^items_soft/(?P<id>\d+)/',include([
        url(r'^edit/$',views.items_soft_edit,name='items_soft_edit'),
        url(r'^delete/$',views.items_soft_delete,name='items_soft_delete'),

    ])),
    url(r'softs/$',views.softs,name='softs'),
    url(r'softs/add/$',views.soft_add,name='add_softs'),
    url(r'^softs/(?P<id>\d+)/edit/$',views.soft_edit,name='edit_soft'),
    url(r'^softs/(?P<id>\d+)/',include([
        url(r'^edit/$',views.soft_edit,name='edit_soft'),
        url(r'^delete/$',views.soft_delete,name='delete_soft'),
    ])),
    url(r'tasks/',views.tasks,name='tasks'),
    url(r'codepush/',views.codepush,name='codepush'),
    url(r'codepush/add',views.codepush_add,name='codepush_add'),
    ]
